<?php $this->_extends('../_layouts/mobile_layout'); ?>
<?php $this->_block('contents'); ?>
<div data-role="content">
	<ul data-role="listview" data-inset="false">
    	<li>入库单：<?=$purchase_order['number']?></li>
    	<li>日期：<?=$purchase_order['purchase_time']?></li>
    	<li>经手人：<?=$purchase_order['purchase_user_name']?></li>
    	<li>结款类型：<?=Helper_BSS_Normal::getIniOne('purchase_order_payment_type', 'value', $purchase_order['payment_type'], 'name')?></li>
    	<li>备注：<?=$purchase_order['notes']?></li>
	</ul>
	<div style="height: 10px;"></div>
	<div data-role="collapsible-set" data-inset="false">
	<?foreach ($item as $i):?>
		<?if ($i['pic_url']):?>
			<a href="<?=Q::ini('custom_system/product_img_show_mobile_prefix')?><?=$i['pic_url'][0]?>&number=<?=$i['product_number']?>" data-rel="dialog" data-close-btn="right" style="float:right;padding:8px 2% 0px 2%;">
				<img src="<?=Q::ini('custom_system/base_url')?>img/view_img.jpg"/>
			</a>
		<?endif;?>
		<div data-role="collapsible" data-collapsed-icon="arrow-d" data-expanded-icon="arrow-u">
			<h2 style="width: 90%;"><?=$i['product_number']?>&nbsp;&nbsp;&nbsp;(<?=$i['budget_quantity']?>)</h2>
			<p>【产品名称】<?=$i['name']?></p>
			<p>【库存】<?=$i['stock_quantity']?></p>
			<p>【待发】<?=$i['sold_quantity']?></p>
			<p>【警告库存】<?=$i['warning_quantity']?></p>
			<p>【安全库存】<?=$i['safe_quantity']?></p>
			<p>【录单数】<?=$i['purchase_budget_quantity']?></p>
			<p>【预计数】<?=$i['budget_quantity']?></p>
			<p>【预计单价】<?=$i['budget_price'] ? sprintf('%.2f', $i['budget_price']) : ''?></p>
			<p>【预计供应商】<?=$i['budget_provider_name']?></p>
			<p>【实际数】<?=$i['actual_quantity']?></p>
			<p>【实际单价】<?=$i['actual_price'] ? sprintf('%.2f', $i['actual_price']) : ''?></p>
			<p>【实际供应商】<?=$i['actual_provider_name']?></p>
			<p>【采购原因】<?=Helper_BSS_Normal::getIniOne('purchase_order_item_reason', 'value', $i['reason'], 'name')?></p>
			<p>【备注】<?=$i['notes']?></p>
		</div>
	<?endforeach;?>
	</div>
</div>
<?php $this->_endblock(); ?>